from rest_framework import serializers

from apps.goods.models import GoodsVisitCount


class GoodsVisitCountSerializer(serializers.ModelSerializer):
    # 外键属性获取
    category = serializers.StringRelatedField()

    class Meta:
        model = GoodsVisitCount
        fields = ["count", "category"]
